]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Correctly show the icon on a notification stack
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 16 Feb 2012 22:23:16 +0000 (17:23 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 17 Feb 2012 18:52:48 +0000 (13:52 -0500)
An actor is removed from its parent after it emits the destroy signal,
so we can't just check if the notification stack has more than one
notification -- we need to check if there's a notification there
that is not the current one.

This was causing spew in the form of:

    "this.notificationStack.get_children()[0]._delegate.setIconVisible
     is not a function"

js/ui/messageTray.js

index 1c7f0bab444de81a15c9303fb85b74647729f23c..9ccc6e4f7b97580bc52d5f6f0fadb4cbc000589d 100644 (file)
@@ -1327,8 +1327,9 @@ const SummaryItem = new Lang.Class({
             }
         }
 
-        if (this.notificationStack.get_children().length > 0)
-            this.notificationStack.get_children()[0]._delegate.setIconVisible(true);
+        let firstNotification = this._stackedNotifications[0];
+        if (firstNotification)
+            firstNotification.notification.setIconVisible(true);
     }
 });
 Signals.addSignalMethods(SummaryItem.prototype);